//
// Created by fanghr on 18-3-30.
//

#ifndef NEF_BACKEND_THREAD_DISP_H
#define NEF_BACKEND_THREAD_DISP_H

#include <pthread.h>
#include <opencv2/opencv.hpp>
#include "thread_mat.h"

class thread_disp {
public:
    cv::Mat disp8;
    bool id_disp_ready;
    pthread_rwlock_t rwlock_disp;
    pthread_t thread;
    bool is_run;
    thread_mat &mat_l;
    thread_mat &mat_r;

    thread_disp(thread_mat &l, thread_mat &r);

    ~thread_disp();

    int run();

    int stop();
};

#endif //NEF_BACKEND_THREAD_DISP_H
